#include <RenderSubSystem/cvRenderlist.h>

namespace cvRenderInterface
{

	void renderinglist_element_disposer::operator() (DrawlistNode * element)
	{
		element->destroy();
	}


	renderinglist_element_mover::renderinglist_element_mover(renderinglist_t & list, renderinglist_it_t & it)
		: m_list(list), m_it(it)
	{}

	renderinglist_element_mover::renderinglist_element_mover(renderinglist_t & list)
		: m_list(list)
	{
		m_it = m_list.end();
	}

	void renderinglist_element_mover::operator() (DrawlistNode * element)
	{
		m_list.insert(m_it, *element);
	}
};
